<h1>Passport List</h1>

<table class='sortable' id='sortable'>
  <thead>
    <tr>
      <th>Id</th>
      <th>Passport number</th>
      <th>Place issued</th>
      <th>Date issued</th>
      <th>Date valid</th>
      <th>Date renewal</th>
      <th>Renewal</th>
      <th>Person</th>
      <th>Created at</th>
      <th>Updated at</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($passport_list as $passport): ?>
    <tr>
      <td><a href="<?php echo url_for('passport/show?id='.$passport['id']) ?>"><?php echo $passport->getid() ?></a></td>
      <td><?php echo $passport->getpassport_number() ?></td>
      <td><?php echo $passport->getplace_issued() ?></td>
      <td><?php echo $passport->getdate_issued() ?></td>
      <td><?php echo $passport->getdate_valid() ?></td>
      <td><?php echo $passport->getdate_renewal() ?></td>
      <td><?php echo $passport->getrenewal() ?></td>
      <td><?php echo $passport->getperson_id() ?></td>
      <td><?php echo $passport->getcreated_at() ?></td>
      <td><?php echo $passport->getupdated_at() ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

  <a href="<?php echo url_for('passport/new?px_id='.$px_id) ?>">New</a>
	<?php slot('submenu') ?>
	<ul>
		<li><?php echo link_to(image_tag('contact info.png', array('title'=>"Contact Info", 'width'=>'65px')), 'px/show?id='.$px_id) ?></li>
		<li><?php echo link_to(image_tag('personal info.png', array('title'=>"Personal Info", 'width'=>'65px')), 'px_personal/index?px_id='.$px_id) ?></li>
		<li><?php echo link_to(image_tag('passport info.png', array('title'=>"Passport Info", 'width'=>'65px')), 'passport/index?px_id='.$px_id) ?></li>
		<li><?php echo link_to(image_tag('visa.png', array('title'=>"Visa Info", 'width'=>'65px')), 'visa/index?px_id='.$px_id) ?></li>
		<li><?php echo link_to(image_tag('other note.png', array('title'=>"Other Notes", 'width'=>'65px')), 'px_note/index?px_id='.$px_id) ?></li>
	</ul>
	<?php end_slot() ?>